package com.wyd.flowable.delegate;

import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.delegate.Expression;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class Delegate1 implements JavaDelegate {
    private Expression type1;

    @Override
    public void execute(DelegateExecution execution) {
        log.info("进入方法：节点名称={} 流程实例id={} variables={} type1={}", execution.getCurrentFlowElement().getName(),
                execution.getProcessInstanceId(), execution.getVariables(), type1.getValue(execution));
        execution.setVariable("cc", "xxx");
    }
}
